/*
 * @Author: Gavin
 * @Date: 2018-09-07 09:43:49
 * @LastEditors: Gavin
 * @LastEditTime: 2018-09-07 16:53:13
 * @Description:
 */
const register = require('babel-core/register')
register(require('../babel/babel.server'))
require('babel-node-modules')([
    'preact-mdc',
    'preact-material-components/esm',
    '@material' // add an array of module names here
])
require('css-modules-require-hook/preset')




const path = require('path')
const { creatServer, createApp } = require('./server')
const { BUILD_PATH } = require('../config/paths')
const xtpl = require('koa-xtpl')

const app = createApp()

app.use(xtpl({
    root: path.join(BUILD_PATH),
    extname: 'html',
    commands: {}
}))

creatServer()
// export default { app, creatServer }

// export default app
